#ifndef FAIR_MOT
#define FAIR_MOT
#include "MxBase/MxBase.h"
#include "MxBase/PostProcessBases/PostProcessDataType.h"
#include "MxBase/Tensor/TensorBase/TensorBase.h"
#include "opencv2/opencv.hpp"
#include "KalmanTracker.h"
#include "MOTConnection.h"

struct FrameImage
{
    MxBase::Image image; // video Image Class
    uint32_t frameId = 0;
    uint32_t channelId = 0;
};

struct center
{
    double x;
    double y;
};

struct V2Param
{
    uint32_t deviceId;
    std::string modelPath;
    V2Param() {}
    V2Param(const uint32_t &deviceId, const std::string &modelPath)
        : deviceId(deviceId), modelPath(modelPath) {}
};

class FairMOT
{
public:
    uint32_t deviceId;
    std::string modelPath;
    std::shared_ptr<MxBase::ImageProcessor> imageProcessorDptr;
    std::shared_ptr<MxBase::Model> modelDptr;
    explicit FairMOT(const V2Param &v2Param);
    APP_ERROR ReadImage(const std::string &imgPath, MxBase::Image &decodedImage);
    APP_ERROR Infer(MxBase::Image &resizeImage, std::vector<MxBase::Tensor> &outputs);
    APP_ERROR PostProcessone(std::vector<MxBase::Tensor> &outputs, std::vector<std::vector<MxBase::ObjectInfo>> &objectInfos);
    APP_ERROR PostProcesstwo(std::vector<MxBase::ObjectInfo> &objInfos, FrameImage &decodedframeImage);
protected:
private:
};

#endif /* FAIR_MOT */